import http from "@/utils/http";

export default {
  namespaced: true,

  state: {
    subRecordList: ""
  },

  mutations: {
    SETSUBRECORDLIST(state, list) {
      state.subRecordList = list;
    }
  },

  actions: {
    getSubRecordList({ commit }) {
      http
        .post(
          "/api/login/add_balance/sub_recording?token=2Q3ntNqyo5eaLmXITABb"
        )
        .then(response => {
          console.log(response);
          if (response) {
            let res = response.data.list;
            commit("SETSUBRECORDLIST", res);
          }
        });
    }
  }
};
